const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
module.exports = {
    mode:'development',
    entry:path.join(__dirname,'src','index.js'),
    output:{
        path:path.join(__dirname,'dist'),
        filename:'bundle.js'
    },
    plugins:[
        new HtmlWebpackPlugin({
            template:path.join(__dirname,'src','index.html'),
            filename:'index.html'
        })
    ],
    module:{
        rules:[
            {
                test:/\.js$/,
                loader:"babel-loader",
                include:path.join(__dirname,'src'),
                exclude:/node_modules/
            }
        ]
    },
    devServer:{
        port:8000,
        static:path.join(__dirname,'dist')
    }
}